<template>
<rx-app>
    <!-- 头部 -->
    <rx-header :header="header"></rx-header>
    <!-- 侧栏 -->
    <rx-aside :slideBar="slideBar" @menuClickCall="menuClickCall"></rx-aside>
    <!-- 主内容 -->
    <rx-main>
        <!-- 固定标题切换 -->
        <div id="components-title">
            <!-- <ul class="clearfix uiTab1 mb5"> -->
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 0">
                    <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Person" active-class="uiTab1-active"><a href="javascript:">人</a></router-link>
                    <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Meeting" active-class="uiTab1-active"><a href="javascript:">会</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 1">
                    <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Recruit" active-class="uiTab1-active"><a href="javascript:" >招</a></router-link>
                    <router-link tag="li" class="col-md-4 fl" to="/projectFiles/PersonRecruit" active-class="uiTab1-active"><a href="javascript:" >个人</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 2">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Cultivate" active-class="uiTab1-active"><a href="javascript:">面</a></router-link>
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/CulPerson" active-class="uiTab1-active"><a href="javascript:">人</a></router-link>
                </ul>
               <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 3">
                  <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Library" active-class="uiTab1-active" ><a href="javascript:">库</a></router-link>
                <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Stay" active-class="uiTab1-active"><a href="javascript:">留</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 4">
                    <router-link tag="li" class="col-md-4 fl" to="/projectFiles/praemfng" active-class="uiTab1-active"><a href="javascript:">库</a></router-link>
                <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Use" active-class="uiTab1-active"><a href="javascript:">用</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 5">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Quit" active-class="uiTab1-active" ><a href="javascript:">人</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 6">
                    <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Fine" active-class="uiTab1-active" ><a href="javascript:">罚</a></router-link>
                </ul>
                 <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 7">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Deposit" active-class="uiTab1-active"><a href="javascript:">押</a></router-link>

                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 8">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Journalism" active-class="uiTab1-active"><a href="javascript:">头</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 9">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/City" active-class="uiTab1-active"><a href="javascript:">城</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 10">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Meeting" active-class="uiTab1-active"><a href="javascript:">会</a></router-link>
                </ul>
                <ul class="clearfix uiTab1 mb5" v-if="menuCall.menuFlag == 11">
                   <router-link tag="li" class="col-md-4 fl" to="/projectFiles/Store" active-class="uiTab1-active"><a href="javascript:">店</a></router-link>
                </ul>
              <!-- </ul> -->
        </div>
       <!-- 具体业务内容 -->
        <router-view></router-view>
        <!-- 消息弹出 -->
        <rx-tips></rx-tips>
    </rx-main>
</rx-app>
</template>
<script>
import rxTips from './Tips/Index.vue'
import { sliderMenu, sliderMenu1 } from '@modules/MaterPersonnel/Common/Utils/menu.js'
export default {
    metaInfo: {
        title: '项目人事',
        titleTemplate: '%s'
    },
    components: {
        rxTips
    },
    data () {
        return {
            // header 传值对象
            header: {
                title: '项目人事',
                list: [
                    {
                        name: '反馈',
                        flag: 0,
                        count: 0,
                        icon: 'https://pa.rxjy.com/abc/images/header/feedback.png'
                    }
                ]
            },
            // slideBar 传值对象
            slideBar: [],
            // slideBar 返回对象
            menuCall: {}
        }
    },
    created () {
        const areaId = Number(sessionStorage.getItem('areaId'))
        if (areaId === 39) {
            this.slideBar = sliderMenu
        } else {
            this.slideBar = sliderMenu1
        }
    },

    methods: {
        menuClickCall (data) {
            this.menuCall = data
        }
    }
}
</script>
